package com.ymttest.database.sqlwapper.shenqisettlement;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.shenqisettlement.HpSettlementNotify;

public class HpSettlementNotifyWrapper {
	
	SqlManager manager;

	public HpSettlementNotifyWrapper() {
		manager = new SqlManager("shenqisettlement");
	}

	@SuppressWarnings("unchecked")
	public HpSettlementNotify selectByPrimaryKey(Long id) {

		HpSettlementNotify hpSettlementNotify = new HpSettlementNotify();
		List<HpSettlementNotify> result = manager
				.getSelectResults(
						"com.ymttest.database.mapping.shenqisettlement.HpSettlementNotifyMapper.selectByPrimaryKey",
						id);
		manager.commit();

		if (result.size() > 0) {
			hpSettlementNotify = result.get(0);
		}

		return hpSettlementNotify;
	}
	
	@SuppressWarnings("unchecked")
	public HpSettlementNotify selectByPaymentId(Long paymentId) {

		HpSettlementNotify hpSettlementNotify = new HpSettlementNotify();
		
		List<HpSettlementNotify> result = manager
				.getSelectResults(
						"com.ymttest.database.mapping.shenqisettlement.HpSettlementNotifyMapper.selectByPaymentId",
						paymentId);
		manager.commit();

		if (result.size() > 0) {
			 hpSettlementNotify = result.get(0);
		}

		return  hpSettlementNotify;
	}
	
	public static void main(String[] args) {
		
		HpSettlementNotifyWrapper wrapper = new HpSettlementNotifyWrapper();
		
		System.out.println(wrapper.selectByPaymentId(11719068699L).getCurrency());
	}
}
